package com.insigma.business.qrcode.welfare.dto;



import com.insigma.business.qrcode.common.vo.DescEnum;

import java.util.LinkedHashMap;
import java.util.Map;


public enum BusinessLicTypeEnum implements DescEnum {


    GT("个体营业执照"),
    QYFR("企业法人营业执照"),
    FZJG("分支机构营业执照"),
    FQYFR("非企业法人营业执照"),
    QT("其他营业执照");


    BusinessLicTypeEnum(String desc) {
        this.desc = desc;
    }


    private String desc;


    @Override
    public String getDesc() {
        return desc;
    }


    
    public static BusinessLicTypeEnum getByEnumName(final String enumName) {
        for (BusinessLicTypeEnum element : values()) {
            if (element.name().equals(enumName)) {
                return element;
            }
        }
        return QT;
    }

    
    public static Map<String, String> getName2DescMap() {

        Map<String, String> name2TitleMap = new LinkedHashMap<>();

        for (BusinessLicTypeEnum element : values()) {
            name2TitleMap.put(element.name(), element.desc);
        }

        return name2TitleMap;
    }
}
